<nz-modal nzTitle="修改 Cookie" nzCentered [(nzVisible)]="visible">
  <ng-container *nzModalContent>
    <form nz-form [formGroup]="settingsForm">
      <nz-form-item>
        <nz-form-control
          [nzWarningTip]="warningTip"
          [nzValidateStatus]="
            control.valid && control.value.trim() !== value
              ? 'warning'
              : control
          "
        >
          <textarea
            [rows]="5"
            wrap="soft"
            nz-input
            formControlName="cookie"
          ></textarea>
        </nz-form-control>
      </nz-form-item>
    </form>
  </ng-container>
  <ng-template [nzModalFooter]>
    <button
      nz-button
      nzType="primary"
      (click)="testCookie()"
      [disabled]="control.value.trim() === ''"
    >
      测试
    </button>
    <button nz-button nzType="default" (click)="handleCancel()">取消</button>
    <button
      nz-button
      nzType="primary"
      nzDanger
      (click)="handleConfirm()"
      [disabled]="control.invalid || control.value.trim() === value"
    >
      确定
    </button>
  </ng-template>
</nz-modal>
